home *** CD-ROM | disk | FTP | other *** search
- <?php
- /* album.php - version 3
- * .net magazine (www.netmag.co.uk), issue 83
- * Matt Kynaston, 2001
- * Distributed under the GNU Public License - www.gnu.org/copyleft/gpl.html
- *
- * The PHP Photo Album displays the contents of a thumbnail directory,
- * linked to full size images in the photo directory. It gives the user
- * the opportunity to upload their own photos to the album, automatically
- * creating tumbnails.
- *
- * Requires PHP4 with the GD and ZLIB extensions installed (php_gd.dll and php_zlib.dll
- * on Windows). These are available from the full download of PHP at www.php.net
- * Modify your php.ini file (C:\WINDOWS\PHP.INI in Windows systems) to point at them
- */
-
- /* constant declaration section
- * change these to modify the album directories or image sizes
- */
- define("NUM_COLS", 4); // number of columns in table
- define("PHOT_DIR", "photos"); // photo directory, relative to this page
- define("THUMB_DIR", "thumbs"); // thumbnail directory, relative to this page
- define("MAX_XY", 150); // maximum width or height of thumbnail image
-
- /* all the functions used on this page have been split off into a
- * seperate file. The include statement below makes them available to this
- * page.
- */
- include("album_functions.php");
-
- ?>
- <html>
- <head>
- <title>Photo Album</title>
- <link href="album.css" rel="stylesheet" type="text/css">
- </head>
-
- <body bgcolor="#FFFFFF" text="#000000">
- <h1>PHP Photo Album</h1>
- <h3>(final version)</h3>
-
- <?php uploadFile() ?>
-
- <form name="form1" method="post" action="<?php print $PHP_SELF?>" enctype="multipart/form-data">
- <p>Add your own image to the album:<br>
- <input type="file" name="ulFile">
- <input type="hidden" name="MAX_FILE_SIZE" value="512000">
- </p>
- <p>
- <input type="submit" name="Submit" value="Upload">
- </p>
- </form>
-
- <p> </p>
-
- <?php makeAlbumTable(); ?>
-
- </body>
- </html>
-